<?php
!defined('M_P') && exit('Forbidden');
InitGP(array('q','a'));
if (strpos ( $q, '..' ) !== false) {
	Showmsg ( 'undefined_action' );
}
include_once (D_P . 'data/bbscache/kxbd_config.php');
require_once (M_P . 'require/core.php');
!$m && $m = 'kxbd';
define("BASEURL", "index.php?m=$m&");
$BaseUrl = BASEURL;
$q = !$q ? $kxbd_defaultindex  ? '' : 'bdindex' : $q;
$kxbdPortals = array(
	'bdindex',
	'bdleader',
	'bddirection',
	'bdplan'
);
if ($q && !in_array($q,$kxbdPortals)) {
	/*House::loadClass('houseurl','utility',false);
	define("MODE", M_P);
	define("APPLICATION", MODE . "application");
	define("APP_VIEWER", APPLICATION . "/front/viewer/");
	define("APP_CONTROLLER", APPLICATION . "/front/controller/");
	define('IMG_PATH','mode/house/images/sendhand');
	$configs = array(
		'c' => $q,
		'a' => $a
	);
	
	$router = L::loadClass("router", "framework");
	$router->run($configs);
	*/
	exit();
}else if ($q && in_array($q,$kxbdPortals)) {
	define('F_M',true);
	require_once R_P.'require/header.php';//PrintEot('header');
	require_once portalEot('kxbd'.$q);
	footer();
}else{
	Showmsg('开心伴读模式未开启');
}
?>